import request from '@/utils/request';
import bodyParse from '@/utils/bodyParse';

//创建续单
export async function renewalorder(params) {
    return request('/wbn-api/renewal_order', {
        method: 'POST',
        data: params,
    });
}

//提交审核
export async function renewalsubmit(params) {
    return request('/wbn-api/renewal_order/dispatch_submit', {
        method: 'PUT',
        data: params,
    });
}

//重试
export async function renewalretry(params) {
    return request('/wbn-api/renewal_order/dispatch_retry', {
        method: 'PUT',
        data: params,
    });
}

//重试
export async function renewalcancel(params) {
    return request('/wbn-api/renewal_order/cancel', {
        method: 'PUT',
        data: params,
    });
}


//业务列表
export async function company(params) {
    return request('/wbn-api/company' + bodyParse(params));
}

export async function companydetail(params) {
    return request('/wbn-api/company/' + params.id);
}

//业务列表
export async function paymentorder(params) {
    return request('/wbn-api/payment_order/' + params);
}

//创建业务
export async function addother_business(params) {
    return request('/wbn-api/other_business', {
        method: 'POST',
        data: params,
    });
}
//删除业务
export async function deleteother_business(params) {
    return request('/wbn-api/other_business/' + params, {
        method: 'DELETE',
    });
}

//创建发票
export async function addinvoice(params) {
    return request('/wbn-api/invoice', {
        method: 'POST',
        data: params,
    });
}

//更新发票
export async function editinvoice(params) {
    return request('/wbn-api/invoice/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//删除发票
export async function deleteinvoice(params) {
    return request('/wbn-api/invoice/' + params, {
        method: 'DELETE',
    });
}




//创建解约
export async function addrescind(params) {
    return request('/wbn-api/rescind', {
        method: 'POST',
        data: params,
    });
}

//更新解约
export async function editrescind(params) {
    return request('/wbn-api/rescind/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//更新解约
export async function persuade_success(params) {
    return request('/wbn-api/rescind/persuade_success', {
        method: 'PUT',
        data: params,
    });
}
//更新解约
export async function account_repair(params) {
    return request('/wbn-api/rescind/account_repair', {
        method: 'PUT',
        data: params,
    });
}
//更新解约
export async function submit_to_keeper(params) {
    return request('/wbn-api/rescind/submit_to_keeper', {
        method: 'PUT',
        data: params,
    });
}
//更新解约
export async function complete_rescind(params) {
    return request('/wbn-api/rescind/complete_rescind', {
        method: 'PUT',
        data: params,
    });
}


//更新解约
export async function submit_to_account(params) {
    return request('/wbn-api/rescind/submit_to_account', {
        method: 'PUT',
        data: params,
    });
}

//创建进项税
export async function addinput_tax(params) {
    return request('/wbn-api/input_tax', {
        method: 'POST',
        data: params,
    });
}

//更新进项税
export async function editinput_tax(params) {
    return request('/wbn-api/input_tax/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//删除进项税
export async function deleteinput_tax(params) {
    return request('/wbn-api/input_tax/' + params, {
        method: 'DELETE',
    });
}
//创建业务
export async function batch_change_account(params) {
    return request('/wbn-api/company/batch_change_account', {
        method: 'PUT',
        data: params,
    });
}

//创建业务
export async function addcompany(params) {
    return request('/wbn-api/company', {
        method: 'POST',
        data: params,
    });
}

//创建业务
export async function addcompanys(params) {
    return request('/wbn-api/company', {
        method: 'PUT',
        data: params,
    });
}

//更新业务
export async function editcompany(params) {
    return request('/wbn-api/company/' + params.id, {
        method: 'PUT',
        data: params,
    });
}



//删除业务
export async function deletecompany(params) {
    return request('/wbn-api/company/' + params, {
        method: 'DELETE',
    });
}


//创建收款单
export async function addpaymentorder(params) {
    return request('/wbn-api/payment_order', {
        method: 'POST',
        data: params,
    });
}
//调度拒绝
export async function paymentordercash(params) {
    return request('/wbn-api/payment_order/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//删除收款单
export async function deletepaymentorder(params) {
    return request('/wbn-api/payment_order/' + params, {
        method: 'DELETE',
    });
}

//调度拒绝
export async function renewalrefuse(params) {
    return request('/wbn-api/renewal_order/account_refuse', {
        method: 'PUT',
        data: params,
    });
}


//调度拒绝
export async function dispatchrefuse(params) {
    return request('/wbn-api/company/dispatch_refuse', {
        method: 'PUT',
        data: params,
    });
}

//调度拒绝
export async function accountrefuse(params) {
    return request('/wbn-api/company/account_refuse', {
        method: 'PUT',
        data: params,
    });
}
//调度拒绝
export async function cashierrefuse(params) {
    return request('/wbn-api/payment_order/cashier_refuse', {
        method: 'PUT',
        data: params,
    });
}
//调度拒绝
export async function accountrefuses(params) {
    return request('/wbn-api/payment_order/account_refuse', {
        method: 'PUT',
        data: params,
    });
}


//更新业务
export async function dispatchretry(params) {
    return request('/wbn-api/company/dispatch_retry', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function accountretry(params) {
    return request('/wbn-api/company/account_retry', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function cashierretry(params) {
    return request('/wbn-api/payment_order/cashier_retry', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function accountretrys(params) {
    return request('/wbn-api/payment_order/account_retry', {
        method: 'PUT',
        data: params,
    });
}



//更新业务
export async function dispatchsubmit(params) {
    return request('/wbn-api/company/dispatch_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新业务
export async function renewalsubmits(params) {
    return request('/wbn-api/renewal_order/account_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新业务
export async function accountcache(params) {
    return request('/wbn-api/company/account_cache', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function accountsubmit(params) {
    return request('/wbn-api/company/account_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新业务
export async function accountsubmits(params) {
    return request('/wbn-api/payment_order/account_submit', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function cashiersubmit(params) {
    return request('/wbn-api/payment_order/cashier_submit', {
        method: 'PUT',
        data: params,
    });
}



//活动列表
export async function activity(params) {
    return request('/wbn-api/activity' + bodyParse(params));
}

//活动列表
export async function setting() {
    return request('/wbn-api/setting');
}

//更新活动
export async function editsetting(params) {
    return request('/wbn-api/setting/' + params.id, {
        method: 'PUT',
        data: params,
    });
}






//创建活动
export async function addactivity(params) {
    return request('/wbn-api/activity', {
        method: 'POST',
        data: params,
    });
}


//创建活动
export async function payment_take(params) {
    return request('/wbn-api/payment_take', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editpayment_take(params) {
    return request('/wbn-api/payment_take/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function transfer_account(params) {
    return request('/wbn-api/other_business/transfer_account', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function receiver_submit(params) {
    return request('/wbn-api/other_business/receiver_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function coordination_submit(params) {
    return request('/wbn-api/other_business/coordination_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function auxiliary_coordination_submit(params) {
    return request('/wbn-api/other_business/auxiliary_coordination_submit', {
        method: 'PUT',
        data: params,
    });
}

//业务列表
export async function otherbusinesstake(params) {
    return request('/wbn-api/other_business_take' + bodyParse(params));
}



//删除活动
export async function deletepayment_take(params) {
    return request('/wbn-api/payment_take/' + params, {
        method: 'DELETE',
    });
}

//创建其他业务提成设置
export async function other_business_take(params) {
    return request('/wbn-api/other_business_take', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editother_business_take(params) {
    return request('/wbn-api/other_business_take/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//登账
export async function set_register(params) {
    return request('/wbn-api/payment_order/set_register', {
        method: 'PUT',
        data: params,
    });
}

//删除活动
export async function deleteother_business_take(params) {
    return request('/wbn-api/other_business_take/' + params, {
        method: 'DELETE',
    });
}

//创建活动
export async function directory(params) {
    return request('/wbn-api/directory', {
        method: 'POST',
        data: params,
    });
}
//更新活动
export async function claim(params) {
    return request('/wbn-api/directory/claim', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function revert_claim(params) {
    return request('/wbn-api/directory/revert_claim', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function remark_company(params) {
    return request('/wbn-api/directory/remark_company', {
        method: 'PUT',
        data: params,
    });
}
//更新活动
export async function editdirectory(params) {
    return request('/wbn-api/directory/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
//删除活动
export async function deletedirectory(params) {
    return request('/wbn-api/directory/' + params, {
        method: 'DELETE',
    });
}

//创建活动
export async function peer(params) {
    return request('/wbn-api/peer', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editpeer(params) {
    return request('/wbn-api/peer/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
//删除活动
export async function deletepeer(params) {
    return request('/wbn-api/peer/' + params, {
        method: 'DELETE',
    });
}

//创建活动
export async function account_tax(params) {
    return request('/wbn-api/account_tax', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editaccount_tax(params) {
    return request('/wbn-api/account_tax/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
//删除活动
export async function deleteaccount_tax(params) {
    return request('/wbn-api/account_tax/' + params, {
        method: 'DELETE',
    });
}


//创建活动
export async function open_account(params) {
    return request('/wbn-api/open_account', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editopen_account(params) {
    return request('/wbn-api/open_account/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
//删除活动
export async function deleteopen_account(params) {
    return request('/wbn-api/open_account/' + params, {
        method: 'DELETE',
    });
}


//创建活动
export async function base_salary(params) {
    return request('/wbn-api/base_salary', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editbase_salary(params) {
    return request('/wbn-api/base_salary/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
//删除活动
export async function deletebase_salary(params) {
    return request('/wbn-api/base_salary/' + params, {
        method: 'DELETE',
    });
}


//更新活动
export async function editactivity(params) {
    return request('/wbn-api/activity/' + params.id, {
        method: 'PUT',
        data: params,
    });
}


//删除活动
export async function deleteactivity(params) {
    return request('/wbn-api/activity/' + params, {
        method: 'DELETE',
    });
}



//更新活动
export async function stopsettle(params) {
    return request('/wbn-api/settle/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
